<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BigInt</title>
</head>

<body>

</body>
<script>
    const n = 521n;
    console.log(n, typeof n);

    // 转化成bigInt
    let m = 123;
    console.log(BigInt(m));

    // 大数值运算
    let max = Number.MAX_SAFE_INTEGER;
    console.log(max, max + 1, max + 2, max + 3);
    console.log(BigInt(max) + BigInt(1));
    console.log(BigInt(max) + BigInt(2));
    console.log(BigInt(max) + BigInt(3));

</script>

</html>